using System.ComponentModel.DataAnnotations;

namespace Lzfy_His_Service.Models
{
    /// <summary>
    /// 通用ID请求
    /// </summary>
    public class GetByIdRequest
    {
        public int Id { get; set; }
    }

    /// <summary>
    /// 字典ID请求
    /// </summary>
    public class GetByDictIdRequest
    {
        public int DictId { get; set; }
    }

    /// <summary>
    /// 文件下载请求
    /// </summary>
    public class DownloadFileRequest
    {
        public string FileId { get; set; } = string.Empty;
    }

    /// <summary>
    /// 根据路径获取文件请求
    /// </summary>
    public class GetFileByPathRequest
    {
        public string Path { get; set; } = string.Empty;
    }

    /// <summary>
    /// Base64文件上传请求
    /// </summary>
    public class UploadBase64FileRequest
    {
        /// <summary>
        /// 患者ID
        /// </summary>
        public string PatientId { get; set; } = string.Empty;

        /// <summary>
        /// 文件名
        /// </summary>
        public string FileName { get; set; } = string.Empty;

        /// <summary>
        /// Base64编码的文件内容
        /// </summary>
        public string FileContent { get; set; } = string.Empty;
    }

    /// <summary>
    /// Base64文件下载请求
    /// </summary>
    public class DownloadBase64FileRequest
    {
        /// <summary>
        /// 文件ID
        /// </summary>
        public string FileId { get; set; } = string.Empty;
    }

    /// <summary>
    /// 根据路径获取Base64文件请求
    /// </summary>
    public class GetBase64FileByPathRequest
    {
        /// <summary>
        /// 文件相对路径
        /// </summary>
        public string Path { get; set; } = string.Empty;
    }





    /// <summary>
    /// ID请求
    /// </summary>
    public class IdRequest
    {
        public long Id { get; set; }
    }

    /// <summary>
    /// 用户名请求
    /// </summary>
    public class UsernameRequest
    {
        [Required(ErrorMessage = "用户名不能为空")]
        [StringLength(50, MinimumLength = 1, ErrorMessage = "用户名长度必须在1-50个字符之间")]
        [RegularExpression(@"^[a-zA-Z0-9_\-\.@]+$", ErrorMessage = "用户名只能包含字母、数字、下划线、连字符、点和@符号")]
        public string Username { get; set; } = string.Empty;
    }

    /// <summary>
    /// 患者ID请求
    /// </summary>
    public class PatientIdRequest
    {
        public string PatientId { get; set; } = string.Empty;
    }

    /// <summary>
    /// 主表ID请求
    /// </summary>
    public class MasterIdRequest
    {
        public long MasterId { get; set; }
    }

    /// <summary>
    /// 联系时间更新请求
    /// </summary>
    public class ContactUpdateRequest
    {
        public long Id { get; set; }
        public DateTime ContactTime { get; set; }
    }

    /// <summary>
    /// 退费任务主表更新请求
    /// </summary>
    public class RefundTaskMasterUpdateRequest
    {
        public long Id { get; set; }
        public string? Username { get; set; }
        public string? Fullname { get; set; }
        public int? AccountCount { get; set; }
        public decimal? AccountSumBalance { get; set; }
    }
}